
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER, DATE } = require('../types')

module.exports = (sequelize) => {
  const health = sequelize.define(
    'health',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      pressureLow: { // 血压-低
        type: STRING,
      },
      pressureHigh: { // 血压-高
        type: STRING,
      },
      urine: { // 排尿
        type: STRING,
      },
      height: {
        type: STRING,
      }, 
      weight: {
        type: STRING,
      },
      bmi: {
        type: STRING,
      },
      date: { // 日期
        type: STRING,
      },
      temperature: { // 体温
        type: STRING,
      },
      userId: { // 用户
        type: STRING,
      },
    },
    {
    tableName: "health",//直接提供表名
    timestamps: false
   }
  );
  return health
}
